import SupplierManagementComp from "../../containers/supplier-maintenance/supplier-management";
import SupplierBankAccountComp from "../../containers/supplier-maintenance/supplier-bank-account";
import SupplierCompanyDeliveryComp from "../../containers/supplier-maintenance/supplier-company-delivery";
import SupplierDetailComp from "../../containers/supplier-maintenance/supplier-detail";

//供应商维护
const supplierMaintenance = {
  key: 'supplier-maintain',
  icon: 'tags',
  company: true,
  admin: false,
  subMenu: [
    //集团供应商维护
    {
      key: 'supplier-maintain-tenant',
      url: '/main/supplier-maintain/supplier-maintain-tenant',
      components: SupplierManagementComp,
      parent: 'supplier-maintain',
      children:{
        //供应商管理-银行定义
        supplierBankAccount: {
          key: 'supplier-bank-account-tenant',
          url: '/main/supplier-maintain/supplier-maintain-tenant/:id/supplier-bank-account-tenant/:source',
          components: SupplierBankAccountComp,
          parent: 'supplier-maintain-tenant'
        },
        //供应商管理-公司分配
        supplierCompanyDelivery: {
          key: 'supplier-company-delivery-tenant',
          url: '/main/financial/management/supplier-maintain-tenant/:id/supplier-company-delivery-tenant',
          components: SupplierCompanyDeliveryComp,
          parent: 'supplier-maintain-tenant'
        },
        //供应商详情
        supplierDetail:{
          key:'supplier-maintain-detail-tenant',
          url:'/main/supplier-maintain/supplier-maintain-tenant/supplier-maintain-detail-tenant/:id',
          components:SupplierDetailComp,
          parent:'supplier-maintain-tenant'
        }
      },
    },
    //公司供应商维护
    {
      key: 'supplier-maintain-company',
      url: '/main/supplier-maintain/supplier-maintain-company',
      components: SupplierManagementComp,
      parent: 'supplier-maintain',
      children:{
        //供应商管理-银行定义
        supplierBankAccount: {
          key: 'supplier-bank-account-company',
          url: '/main/supplier-maintain/supplier-maintain-company/:id/supplier-bank-account-company/:source',
          components: SupplierBankAccountComp,
          parent: 'supplier-maintain-company'
        },
        //供应商管理-公司分配
        supplierCompanyDelivery: {
          key: 'supplier-company-delivery-company',
          url: '/main/financial/management/supplier-maintain-company/:id/supplier-company-delivery-company',
          components: SupplierCompanyDeliveryComp,
          parent: 'supplier-maintain-company'
        },
        //供应商详情
        supplierDetail:{
          key:'supplier-maintain-detail-company',
          url:'/main/supplier-maintain/supplier-maintain-company/supplier-maintain-detail-company/:id',
          components:SupplierDetailComp,
          parent:'supplier-maintain-company'
        }
      },
    },
  ],
};

export default supplierMaintenance
